home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(move_delay >= 0)
- {
- move_delay--;
- }
- if(this.moveble && move_delay < 0)
- {
- if(c_path <= 0)
- {
- move_direction = -1;
- }
- if(c_path >= move_path)
- {
- move_direction = 1;
- }
- if(move_direction == 1)
- {
- c_path -= move_speed;
- _X = _X + move_speed * Math.sin(move_angle * 0.017453292519943295);
- _Y = _Y - move_speed * Math.cos(move_angle * 0.017453292519943295);
- }
- if(move_direction == -1)
- {
- c_path += move_speed;
- _X = _X - move_speed * Math.sin(move_angle * 0.017453292519943295);
- _Y = _Y + move_speed * Math.cos(move_angle * 0.017453292519943295);
- }
- }
- if(this.active && to)
- {
- if(this.hitTest(_root.bullet._x,_root.bullet._y,true) or this.hitTest(_root.bullet._x - 10 * Math.sin(_root.bullet._rotation * 0.017453292519943295),_root.bullet._y + 10 * Math.cos(_root.bullet._rotation * 0.017453292519943295),true) or this.hitTest(_root.bullet._x - 20 * Math.sin(_root.bullet._rotation * 0.017453292519943295),_root.bullet._y + 20 * Math.cos(_root.bullet._rotation * 0.017453292519943295),true))
- {
- _root.spark(_X + _root.half_heart,_Y + _root.half_heart,Obj._x + _root.half_heart,Obj._y + _root.half_heart);
- _root.do_sound("sHeart-port",true);
- _root.boom(_X,_Y,"black",35);
- rea();
- }
- i = 0;
- while(i < _root.tohit.length)
- {
- if(this.active && _root[_root.tohit[i]].active && this.hitTest(_root[_root.tohit[i]]._x,_root[_root.tohit[i]]._y,true))
- {
- _root.do_sound("sHeart-port",true);
- _root.boom(_X,_Y,"black",35);
- Obj.to = false;
- _root[_root.tohit[i]]._x = Obj._x + 13;
- _root[_root.tohit[i]]._y = Obj._y + 53;
- setTimeout(Obj.set_to,100);
- _root.boom(Obj._x,Obj._y,"black",35);
- }
- i++;
- }
- }
- }
-